#ifndef VCHAT_H
#define VCHAT_H

#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QSpinBox>
#include <QTextEdit>
#include <QScrollBar>

#include <QGridLayout>

#include <QDateTime>

#include "../Controlers/CChat.h"

class VChat : public QWidget
{
    Q_OBJECT
    private:
    QTextEdit *log_label;
    QScrollBar *vertical_scrollbar;
    QLabel *port_label;
    QPushButton *start_button;
    QSpinBox *port_spin;

    QGridLayout *layoutp;

    CChat *c_chat;
    public:
    VChat();
    ~VChat();

        void addLogLine(QString content, QString color);

    public slots:
        void start();
        void new_client(QString _username);
        void receive_chat(QString message);
        void disconnect(QString _username);
};

#endif // VCHAT_H
